#!/bin/bash

###git
echo "安装git？Y/N"
read state
if [[ $state == 'Y' || $state == 'y' ]]
then
	sudo apt install git
	git config --global user.name "TURBOyan"
	git config --global user.email "turbo1928@icloud.com"
	git config --global credential.helper store #解决每次都要输入用户名密码
	echo "==git安装程序完成=="
fi

###chrome
#dpkag安装的软件卸载教程：sudo dpkg -r 软件名
echo "安装chrome？Y/N"
read state
if [[ $state == 'Y' || $state == 'y' ]]
then
	echo "==去https://www.google.cn/chrome/下载deb安装包，并拷贝至本文件同级目录下，输入y继续=="
	read reserve	
	echo "==输入要解压的文件名，带后缀=="
	read file_name
	sudo dpkg -i $file_name
	echo "==chrome安装程序完成=="
fi

###搜狗拼音
#dpkag安装的软件卸载教程：sudo dpkg -r 软件名
echo "安装搜狗拼音？Y/N"
read state
if [[ $state == 'Y' || $state == 'y' ]]
then
	echo "==去https://pinyin.sogou.com/linux/?r=pinyin下载deb安装包，并拷贝至本文件同级目录下，输入y继续=="
	read reserve	
	echo "==输入要解压的文件名，带后缀=="
	read file_name
	sudo dpkg -i $file_name
	echo "若有依赖问题请运行sudo apt install -f "
	echo "==搜狗拼音安装程序完成，请去语言支持设置界面将输入法设置为fcitx，然后注销重新登陆即可=="
fi


###vscode
#dpkag安装的软件卸载教程：sudo dpkg -r 软件名
echo "安装vscode？Y/N"
read state
if [[ $state == 'Y' || $state == 'y' ]]
then
	echo "==去https://code.visualstudio.com下载deb安装包，并拷贝至本文件同级目录下，输入y继续=="
	read reserve	
	echo "==输入要解压的文件名，带后缀=="
	read file_name
	sudo dpkg -i $file_name
	echo "==vscode安装程序完成=="
fi

###其他软件
echo "安装其他软件？Y/N"
read state
if [[ $state == 'Y' || $state == 'y' ]]
then
	#ifconfig要用
	sudo apt install -Y net-tools 	
	#ssh服务
	sudo apt install -Y openssh-server  ssh 
fi